import online.longzipeng.AdminApplication;
import online.longzipeng.modules.user.mapper.UserMapper;
import online.longzipeng.modules.user.service.UserService;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

/**
 * @Author: lzp
 * @description:
 * @Date: 2023/2/16
 */
@SpringBootTest(classes = AdminApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class DynamicDatasourceDemo {

	@Autowired
	private UserMapper userMapper;

	@Autowired
	private UserService userService;

	@Test
	public void testDemo() {
//		User user = userMapper.getUser();
//		System.out.println(user.getNickName());

		userService.testDynamicDatasources();
	}


}
